import request from '@/utils/request'


export function getRolesInfo(data) {
    return request({
        url: '/role',
        method: 'get',
        params: data
    })
}
export function addRoles(data) {
    return request({
        url: '/role/create',
        method: 'get',
        params: data
    })
}
export function removeManager(id) {
    return request({
        url: `/role/${id}`,
        method: 'delete'
    })
}
export function addPowers(data) {
    return request({
        url: '/role',
        method: 'post',
        params: { data }
    })
}
export function searchInfo(data) {
    return request({
        url: '/roleNameSearch',
        method: 'get',
        params: data
    })
}

export function getTotal() {
    return request({
        url: '/getAllTableNumbers',
        method: 'get',
        params: { table_name: 'role' }
    })
}